<div id="info_list">
    <div class="modal-header">
        <span class="modal-title">{:lang('v_user')}</span>
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span></button>
    </div>
    <!--内容 开始-->
    <div class="px-3 pt-3">
        <form name="form_checksearch" id="form_checksearch" class="row">
            <input type="hidden" name="lang" id="lang" value="{$lang}">
            <div class="w-100 px-2">
                <div class="input-group">
                    <input name="keyword" id="keyword" placeholder="{:lang('v_quickfind')}" type="text" class="form-control">
                    <span class="input-group-append">
                        <button type="button" id="search_info" class="btn btn-success"><i class="fa fa-search mr-1"></i>{:lang('v_search')}</button>
                    </span>
                </div>
            </div>
        </form>
    </div>
    <div class="p-3">
        <table class="table table-striped table-bordered table-hover mb-0">
            <tr>
                <td class="text-center"><span class="checkbox-toggle">ID</span></td>
                <td>{:lang('v_avatar')}</td>
                <td>{:lang('v_user')}</td>
                <td class="text-center">{:lang('v_do')}</td>
            </tr>
            <form name="form_check" id="form_check">
                {volist name="list" id="rs"}
                    <tr>
                        <td class="text-center">{$rs.id}</td>
                        <td><img src="{$rs.avatar}" height="30" class="img-rounded" onerror="this.src='{:config('template.skin')}/img/nopic.png'" /></td>
                        <td>[ {$rs.username} ] {$rs.nickname}</td>
                        <td class="text-center">
                            <span class="btn btn-sm btn-default" onclick="javascript:check_close('{$rs.id}','{$rs.nickname}');"><i class="fa fa-check-circle mr-1"></i>{:lang('v_select')}</span>
                        </td>
                    </tr>
                {/volist}
                <tr>
                    <td colspan="4">
                        <div class="row">
                            <div class="col-md-12 mt-2">
                                <div class="float-left">{$list->render()|raw}</div>
                                <div class="float-right">{:lang('v_total')} {$lastPage} {:lang('v_page')} {$total} {:lang('v_records')}</div>
                            </div>
                        </div>
                    </td>
                </tr>
            </form>
        </table>
    </div>
    <!--内容 结束-->
    <script type="text/javascript">
    //ajax翻页
    $("#info_list").delegate(".pagination a","click",function(){
        $.get(this.href,function(html){
            $("#info_list").replaceWith(html);
        });
        return false;
    });
    //搜索ajax翻页
    $('#search_info').click(function(){
        var href = '{:url('/user/index')}?method=signle&lang='+$('#lang').val()+'&keyword='+$('#keyword').val();
        $.get(href,function(html){
            $("#info_list").replaceWith(html);
        });
    });
    //关闭窗口
    function check_close(id,title){
        $('#userid').val(id);
        $('#user_title').val(title);
        $("#modal").modal('hide');
    }
    </script>
</div>